package simple

/*
*执行用时分布
7ms
击败
29.24%
*/
func twoSum(nums []int, target int) []int {
	l := len(nums)
	m := make(map[int]int)
	for i := 0; i < l; i++ {
		if j, ok := m[target-nums[i]]; ok {
			return []int{i, j}
		}
		m[nums[i]] = i
	}
	return nil
}
